package com.sdy.dataexchange.meta.model;

import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.sdy.common.model.BaseModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * @author wyy
 * @since 2019-10-25
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
public class MetadataColumn extends BaseModel {
    private static final long serialVersionUID = 1L;

    /**
     * 字段ID
     */
    @TableId
    private Integer id;

    private Integer tableId;
    /**
     * 表名
     */
    private String tableName;

    /**
     * 字段类型
     */
    private String columnName;

    /**
     * 字段名称
     */
    private String dataType;

    /**
     * 字段长度
     */
    private Integer dataLength;

    /**
     * 是否为空  0-否 1-是
     */
    private String dataEmpty;

    /**
     * 默认值
     */
    private String dataDefault;

    /**
     * 字段注释
     */
    private String comments;

    /**
     * 是否主键 0-否 1-是
     */
    private String dataKey;


    @JsonFormat(pattern = DATETIME_FORMAT)
    private Date operationTime;

}
